<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ page import="java.util.ArrayList" %>
    <%@ page import='es.ats.codington.festival.domain.Event' %>
    <%@taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>New Codington</title>
<link type="text/css" rel="stylesheet" href="css/mystyle.css">
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js?ver=1.4.2"></script>
    <script src="js/login.js"></script>
</head>
<body >
 
 <div id="container"> <!--para centrar cuadro-->
   <!-- Login Starts Here -->
   <header>
   <nav>
   <ul class="">
  <li id="logo" ><img src="./images/logo2.jpg"></li>
<%   Object iD = session.getAttribute("iDVisitor");
int id= (Integer) iD; 
		    
if (id==1){%>

 <li id="ref1"><a href="pre_createvent.htm">Register event</a></li> 
<li id="ref1"><a href="pre_createplace.htm">Create new place</a></li> 
<li id="ref1"><a href="pre_updatepassword.htm">Update password</a></li>
<li id="ref1"><a href="pre_updatedata.htm">Update information</a></li> 

   <% }else{%>
<li id="ref1"><a href="showmy_event.htm">My Events</a></li> 
<li id="ref1"><a href="pre_updatepassword.htm">Update password</a></li>
<li id="ref1"><a href="pre_updatedata.htm">Update information</a></li> 


<%} %> 


</ul>
</nav>
</header>
		<%String usu=(String)session.getAttribute("username"); %>
		<% String pass=(String)session.getAttribute("password"); %>
<nav id="loginContainer">
 </form id="loginForm">
 
 <form class="UpdatePassServlet" action="pre_logout.htm" method="GET" >
 <input id="loginButtonOut" type="submit" value="Logout" />
				
	<h3> Bienvenido <%=usu%></h3>
</form>
</nav>

<br>
<aside id="columna">
  <p class="Sub_title">MENU</p>

			<ul class="nav2">
				<ul>
				<li><a href="home.htm">Home</a></li>
				<br>
				<li><a href="history.htm">History</a></li>
				<br>
				<li><a href="">North Places<br></a>
				<br>
				<ul>
				<article class="menunorth">
				<li><a href="listmuseum.htm?type=Museum">Museum</a></li>
				<br>
				<li><a href="listtheater.htm?type=Theater">Theater</a></li>
				<br>
				<li><a href="liststadium.htm?type=Stadium">Stadium</a></li>
				<br>
				<li><a href="listbusiness.htm?type=large Business">Large Business</a></li>
				</article>
				</ul>
				</li>
				<li><a href="">South Places</a>
				<ul>
				<article class="menusouth">
				<li><a href="listzoo.htm?type=Zoo">Zoo</a></li>
				<br>
				<li><a href="listpark.htm?type=Park">Park</a></li>
				<br>
				<li><a href="listattraction.htm?type=Tourist Attraction">Turist Attraction</a></li>
				<br>
				<li><a href="listmarket.htm?type=Traditional Market">Traditional Market</a></li>
				</article>
				</ul>
				</li> 
			</ul>
	
	
	</aside>
	
	
	<hgroup>
        <p>Festival Registration System</p>
   	</hgroup>
	<section class="cuadroblanco">
	<article class="Sub_title">
        <p> Events in North Town</p>
   	</article>

    <article class="div_borde"> 
	<article id=tabla1>

		<table >
			<% int size =(Integer) request.getAttribute("size");%>
			<% ArrayList<Event> allevents  = new ArrayList<Event>(); %>
			
			<% allevents = (ArrayList<Event>) request.getAttribute("events"); %>
		
			<tr>
				<td for="eventname"><strong>NAME</strong></td>
				
				<td for="Places"><strong> PLACE</strong></td>
				
				<td for="availabletickets" ><strong>SEATS</strong></td>
				
			</tr>
			<tr></tr><tr></tr>
			<% 	for (int _i0 = 0;_i0 < size ; _i0++) { %>

			<tr>			
				<td > <a href="show_event.htm?idevent=<%=allevents.get(_i0).getiDevent()%>" > <%=allevents.get(_i0).getNamevent() %>   </td>
				<td> <a href="showplace.htm?idplace=<%=allevents.get(_i0).getPlace().getiDplace()%>"><%=allevents.get(_i0).getPlace().getName()%> </td>
				<td> <%= allevents.get(_i0).getSeats()%></td>
			</tr>
			<tr></tr><tr></tr>
				
			<%
		       	        
		      } %>
			
			</table>
	</article>
</article>
</br></br>
</section>	
 

</body>
</html>
